<!DOCTYPE html>
<html lang="ch" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>默认的标题</title>
    <meta name="description" content="默认的描述">
    <meta name="keywords" content="默认的关键字">
    <link th:href="@{css/bootstrap.min.css}" rel="stylesheet">
    <script th:src="@{js/bootstrap.bundle.min.js}"></script>
    <style>
        img {
            width: 100px;
            height: 100px;
        }
    </style>
</head>
<body>
<div class="container mt-3">
    <table class="table table-hover">
        <thead>
        <tr>
            <th>编号</th>
            <th>商品图片</th>
            <th>商品名</th>
            <th>价格</th>
            <th>库存</th>
        </tr>
        </thead>
        <tbody>
        <tr th:each="item,index : ${goodsList}">
            <td th:text="${item.id}"></td>
            <td>
                <img th:src="|/images/${item.img}|" alt="商品图片">
            </td>
            <td th:text="${item.name}"></td>
            <td th:text="${item.price}"></td>
            <td th:text="${item.ware}"></td>
        </tr>
        </tbody>
    </table>
</div>
</body>
</html>